/**
 * 事件模板配置
 * 定义所有随机事件的模板
 */

export const EVENT_TEMPLATES = [
    {
        id: 'drought',
        name: '旱灾',
        description: '持续的干旱影响了农田产量，粮食产出减少30%',
        duration: 24, // 小时
        effect: { type: 'production_penalty', building: 'farm', penalty: 0.3 },
        probability: 0.1
    },
    {
        id: 'merchant',
        name: '商人来访',
        description: '一位商人经过村庄，愿意用20木材换取30粮食',
        type: 'choice',
        options: [
            { text: '接受交易', requirements: { wood: 20 }, rewards: { food: 30 } },
            { text: '拒绝交易', requirements: {}, rewards: {} }
        ],
        probability: 0.15
    },
    {
        id: 'wandering_craftsman',
        name: '流浪工匠',
        description: '一位流浪工匠请求定居，需要100木材，后续提升工坊效率',
        type: 'choice',
        options: [
            {
                text: '接纳工匠',
                requirements: { wood: 100 },
                rewards: { building_efficiency: { sawmill: 0.2 } }
            },
            { text: '拒绝请求', requirements: {}, rewards: {} }
        ],
        probability: 0.05
    },
    {
        id: 'villager_dispute',
        name: '村民纠纷',
        description: '两个村民因为土地边界发生争执，需要你的调解',
        type: 'choice',
        options: [
            {
                text: '公正调解',
                requirements: {},
                rewards: { morale: 5 }
            },
            {
                text: '偏袒一方',
                requirements: {},
                rewards: { morale: -5, food: 10 }
            }
        ],
        probability: 0.1
    },
    {
        id: 'wild_berries',
        name: '发现野果',
        description: '村民在附近森林发现了野果，获得额外的食物',
        type: 'reward',
        rewards: { food: 20 },
        probability: 0.2
    },
    {
        id: 'wood_discovery',
        name: '优质木材',
        description: '伐木队发现了一片优质林地，获得额外的木材',
        type: 'reward',
        rewards: { wood: 25 },
        probability: 0.2
    },
    {
        id: 'skilled_farmer',
        name: '技艺精湛的农夫',
        description: '一位经验丰富的农夫愿意教导村民，需要50粮食作为报酬',
        type: 'choice',
        options: [
            {
                text: '聘请教导',
                requirements: { food: 50 },
                rewards: { building_efficiency: { farm: 0.15 } }
            },
            { text: '婉言谢绝', requirements: {}, rewards: {} }
        ],
        probability: 0.08
    },
    {
        id: 'population_boom',
        name: '人口增长',
        description: '村庄的良好环境吸引了一个家庭迁入',
        type: 'reward',
        rewards: { population: 2 },
        probability: 0.12
    }
];
